from flask_restful import Api

from apps.settingApi.api.timerTask.views import timerTaskListView, timerTaskPkView, timerTaskConfigListView, \
    timerTaskLogsListView, timerTaskLogsPkView

timer_task_api = Api(prefix='/setting/timertask/')

# 列表操作get查询任务，post批量启动或停止任务
timer_task_api.add_resource(timerTaskListView,'/timertasklist/',endpoint="timertasklist")
# PK操作get查询单个
timer_task_api.add_resource(timerTaskPkView,'/timertaskpk/<pk>/',endpoint="timertaskpk")

# 日志列表操作 get查询日志列表，put查询异常数据列表
timer_task_api.add_resource(timerTaskLogsListView,'/timertasklogslist/',endpoint="timertasklogslist")
# put忽略异常日志
timer_task_api.add_resource(timerTaskLogsPkView,'/timertasklogspk/<pk>/',endpoint="timertasklogspk")

# 任务配置
timer_task_api.add_resource(timerTaskConfigListView,'/timertaskconfiglist/',endpoint="timertaskconfiglist")

